chore: regenerate test vectors against leanSpec main and fix fork-choice harness - #120
Conversation
ArtiomTr
left a comment
There was a problem hiding this comment.
Everything looks good, only minor nitpicks need to be fixed
|
@ArtiomTr all required changes done! |
|
looks like client build fails? something with http_api test driver: |
yeah sorry about that, I forgot to check build before committing. should be fine now. |
|
hey @ArtiomTr @SoarinSkySagar , I was just in general looking through this and is there a reason why you guys are directly adding the JSON fixtures to the repository. |
Sahilgill24
left a comment
There was a problem hiding this comment.
something like this and now the fixtures are in the local and test's can be run on it, I believe all the other lean clients follow this only.
LEAN_SPEC_FIXTURES_URL ?= https://github.com/leanEthereum/leanSpec/releases/latest/download/fixtures-prod-scheme.tar.gz
fixtures-temp:
tmpdir=$$(mktemp -d); \
echo "Extracting fixtures to $$tmpdir"; \
curl -L -f "$(LEAN_SPEC_FIXTURES_URL)" | tar -xz -C "$$tmpdir"; \
echo "Fixtures available at: $$tmpdir"
@Sahilgill24 I think the main concern we have with this approach is that it takes a very long time just to regenerate the test vectors (~57 minutes for all tests and total 2.5 hours with deterministic tests, on my machine). So regenerating the test vectors each time during testing consumes a lot of time when we can just download and reuse them and only regenerate them when we have a major update on the tests. Would like to hear your suggestions/opinion on this. |
|
I am not sure why it would be taking 57 minutes for the regeneration because the tar archive for the test vectors is just 150Mb and running them is like almost 1-2 minutes. |
Because we don't want to make our CI builds fragile. See, with your proposed script, you're downloading "latest" release. This makes CI impure, and this brings tons of issues to development process:
This also makes some things more irritating, though they don't affect development directly:
Some good things that we get from our approach, which are nice-to-have, but not the main reason we do things such way:
Our approach has some downsides too:
With that all said, I think our current approach is better than downloading latest spec test version. Maybe if leanSpec does tagged releases at some point, then we could transition to downloading spec tests instead of generating them on our own - though I think currently that doesn't make much sense for leanSpec, considering the pace new changes are introduced. |
|
@Sahilgill24 if you want to continue discussion, I can create a separate issue for that, so we can discuss other approaches of managing test vectors. |
|
@ArtiomTr surely, we can discuss a few approaches |
yes, I was using the uv command |
used
make generate-test-vectors LEAN_SPEC_COMMIT=0f5b8e58e58c0e155ae8b95eabbbde0b9ad8840ato download the latest leanSpec tests and fixed the harness forfork_choice, the previous test suite hadfcin the directory but new suite hasfork_choice, so had to to change it.